home *** CD-ROM | disk | FTP | other *** search
/ Menu Planner / Menu Planner (Ohio Distinctive Software).ISO / pc / mp.dir / 00143_ClearPuppetSprites.ls < prev    next >
Encoding:
Text File  |  1995-11-07  |  3.9 KB  |  109 lines

  1. on clearButtons
  2.   set whichSection to the frameLabel
  3.   if whichSection = "PDC" then
  4.     clearPDCButtons()
  5.   else
  6.     if (whichSection = "lunch") or (whichSection = "lunch veg") then
  7.       clearLunchButtons()
  8.     else
  9.       if (whichSection = "Breakfast") or (whichSection = "Breakfast Veg") or (whichSection = "Brunch") or (whichSection = "Brunch Veg") then
  10.         clearBreakfastButtons()
  11.       else
  12.         if (whichSection = "Dinner") or (whichSection = "Dinner veg") then
  13.           clearDinnerButtons()
  14.         else
  15.           if (whichSection = "Dinner2") or (whichSection = "Dinner2 Veg") then
  16.             clearDinner2Buttons()
  17.           end if
  18.         end if
  19.       end if
  20.     end if
  21.   end if
  22. end
  23.  
  24. on clearPDCButtons
  25.   set btnNames to "diabetes,heart,preg,hypr,vegt,under_19,low_fat,none"
  26.   repeat with x = 1 to 8
  27.     set the castNum of sprite (x + 7) to the number of cast ("red_" & item x of btnNames)
  28.     puppetSprite(x + 7, 0)
  29.   end repeat
  30.   repeat with x = 1 to 3
  31.     set the castNum of sprite (x + 45) to the number of cast ("red_fat_" & x)
  32.     set the visible of sprite (x + 45) to 0
  33.     puppetSprite(x + 45, 0)
  34.   end repeat
  35.   set the visible of sprite 45 to 0
  36.   puppetSprite(45, 0)
  37. end
  38.  
  39. on clearLunchButtons
  40.   set btnNames to "lun_meat,lun_pasta,lun_sand"
  41.   repeat with x = 1 to 3
  42.     set the castNum of sprite (x + 13) to the number of cast ("red_" & item x of btnNames)
  43.     puppetSprite(x + 13, 0)
  44.   end repeat
  45.   set the castNum of sprite 18 to the number of cast "red_lun_salad"
  46.   set the castNum of sprite 17 to the number of cast "red_lun_soup"
  47.   puppetSprite(17, 0)
  48.   puppetSprite(18, 0)
  49.   set the castNum of sprite 19 to the number of cast "red_lun_fruit"
  50.   set the castNum of sprite 20 to the number of cast "red_lun_salad"
  51.   puppetSprite(19, 0)
  52.   puppetSprite(20, 0)
  53.   set the castNum of sprite 21 to the number of cast "red_lun_milk"
  54.   set the castNum of sprite 22 to the number of cast "red_lun_cheese"
  55.   puppetSprite(21, 0)
  56.   puppetSprite(22, 0)
  57. end
  58.  
  59. on clearBreakfastButtons
  60.   set btnNames to "brk_eggs,brk_meat,brk_pancakes,brk_cereal,brk_potatoes"
  61.   repeat with x = 1 to 5
  62.     set the castNum of sprite (x + 17) to the number of cast ("red_" & item x of btnNames)
  63.     puppetSprite(x + 17, 0)
  64.   end repeat
  65.   set the castNum of sprite 23 to the number of cast "red_brk_fruit"
  66.   set the castNum of sprite 24 to the number of cast "red_brk_juice"
  67.   puppetSprite(23, 0)
  68.   puppetSprite(24, 0)
  69. end
  70.  
  71. on clearDinnerButtons
  72.   set the castNum of sprite 12 to the number of cast "red_din_meat"
  73.   set the castNum of sprite 13 to the number of cast "red_din_pasta"
  74.   puppetSprite(12, 0)
  75.   puppetSprite(13, 0)
  76.   set the castNum of sprite 17 to the number of cast "red_din_bread"
  77.   set the castNum of sprite 18 to the number of cast "red_din_potatoes"
  78.   puppetSprite(17, 0)
  79.   puppetSprite(18, 0)
  80.   set the castNum of sprite 19 to the number of cast "red_din_soup"
  81.   set the castNum of sprite 20 to the number of cast "red_din_salad"
  82.   puppetSprite(19, 0)
  83.   puppetSprite(20, 0)
  84.   set the castNum of sprite 23 to the number of cast "red_din_dessert"
  85.   puppetSprite(23, 0)
  86. end
  87.  
  88. on clearDinner2Buttons
  89.   set btnNames to "lun_meat,lun_pasta,lun_sand"
  90.   repeat with x = 1 to 3
  91.     set the castNum of sprite (x + 13) to the number of cast ("red_" & item x of btnNames)
  92.     puppetSprite(x + 13, 0)
  93.   end repeat
  94.   set the castNum of sprite 17 to the number of cast "red_din_bread"
  95.   set the castNum of sprite 18 to the number of cast "red_din_potatoes"
  96.   puppetSprite(17, 0)
  97.   puppetSprite(18, 0)
  98.   set the castNum of sprite 19 to the number of cast "red_din_soup"
  99.   set the castNum of sprite 20 to the number of cast "red_din_salad"
  100.   puppetSprite(19, 0)
  101.   puppetSprite(20, 0)
  102.   set the castNum of sprite 21 to the number of cast "red_lun_milk"
  103.   set the castNum of sprite 22 to the number of cast "red_lun_cheese"
  104.   puppetSprite(21, 0)
  105.   puppetSprite(22, 0)
  106.   set the castNum of sprite 23 to the number of cast "red_din_dessert"
  107.   puppetSprite(23, 0)
  108. end
  109.